package com.uubx.mapper;

import com.uubx.pojo.User;
import com.uubx.vo.TokenVo;
import com.uubx.vo.UserVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author wuguojun
 * @Date 2020/12/28 9:44
 * @Version 1.0
 */
public interface UserMapper {
    //分页查询
    public List<User> queryAllUser(UserVo userVo);

    public Long queryAllUserCount(UserVo userVo);

    //通过电话号码查询
    public List<User> queryUserByPhone(String phone);

    //通过部门id查询该部门下所有员工
    public List<User> queryAllUsersByDepartmentId(Integer departmentId);

    //通过部门id查询该部门下所有员工 count
    public Long queryAllUsersByDepartmentIdToCount(Integer departmentId);

    //通过角色id查询该部门下所有员工
    public List<User> queryAllUsersByRoleId(Integer roleId);

    //通过角色id查询该部门下所有员工 count
    public Long queryAllUsersByRoleIdToCount(Integer roleId);

    //通过启用状态查询
    public List<User> queryUserByStatus(UserVo userVo);


    //通过启用状态查询账户 总数
    public Long queryUserByStatusCount(Integer status);

    //停用账户状态
    public void updateUserByStatus(@Param("id")Integer id,@Param("status")Integer status);

    //通过id查询账户
    public User queryUserById(Integer id);

    //添加账户
    public void addUser(User user);

//    //编辑账户
    public void updateUser( User user);

    //通过账户名字查询
    public User queryUserByUsername(String username);


    //通过username修改token等数据
    public void updateToken(TokenVo tokenVo);

    //通过token删除token
    public void deleteToken(String token);











}
